/*
 * @Author: luoqi
 * @Date: 2022-03-28 12:50:25
 * @LastEditors: luoqi
 * @LastEditTime: 2022-03-28 16:46:39
 * @Description: 
 */
import {ADDTAB,DELTAB,CHANGEACTIVE} from './constent'

//添加标签 data格式为{ title, key,content: tabs[item.key] || item.name}
export let addTab=(data)=>({type:ADDTAB,data:data})

//删除标签 data格式为{key：1}
export let delTab=(data)=>({type:DELTAB,data:{key:data}})

//改变激活项 data格式为{activeKey:1}
export let changeActive=(data)=>{
  return {type:CHANGEACTIVE,data:{activeKey:data}}
}